<template>
  <div class="chain" style="height: 100%">
  </div>
</template>

<script>

const commColor = {
  0: "primary",
  1: "danger",
}

const nodeStatus = {
  0: "禁用",
  1: "运行",
}

import { getNodeList, getTransactionTotal, getSearchBlock } from "@/apis/block.js"
import 'vue-json-pretty/lib/styles.css';
import VueJsonPretty from 'vue-json-pretty';
// import * as echarts from 'echarts';

export default {
  name: "Home",

  data(){
    return {
      notice:{},
      notifications:null,
    }
  },
 async mounted() {
   this.request('/notice/findNewNoticeList').then(res=>{
     this.notice = res.data[0]||{};
     if(this.notice.content){
       this.$notify({
         title: '最新公告',
         message: this.notice.content,
       });
     }
   })
   this.request('/notifications/findNewNotice').then(res=>{
     this.notifications = res.data.newNotice
     if(this.notifications == null)
       return;
     if(this.notifications.content){
       this.$notify({
         title: '未读消息数量：'+res.data.newNoticeCount,
         message: "最新消息："+this.notifications.content,
       });
     }
   })

  },
  methods:{
  }
}
</script>

<style scoped>

</style>
